-- don_quixote
-- created by shuzy
-- 状态： 堂吉诃德

return {
    fetchProps = function(who, status, condition)
        local value1 = tonumber(condition["value1"]);
        local value2 = tonumber(condition["value2"]);
        local endRound   = condition["end_round"];
        local props = {};
        local propId = PropM.getPropId("attrib");

        table.insert(props, { propId, "attack", value1, endRound, });

        -- 减少伤害
        propId = PropM.getPropId("damage");
        table.insert(props, { propId, 1, value2, endRound, });
        
        -- 必定命中
        propId = PropM.getPropId("true_strike");
        table.insert(props, { propId, 1, 1, endRound, });

        return props;
    end,

    desc = function(who, status, condition)
        -- 获取状态描述
        local cfg = CombatStatusM.getStatusInfo(status);
        local desc = cfg.desc;

        -- 效果，百分比
        local value1 = tonumber(condition["value1"]);
        local value2 = tonumber(condition["value2"]);

        desc = string.gsub(desc, "{value1}", value1 / 10);
        desc = string.gsub(desc, "{value2}", value2 / 10);

        return desc;
    end,
};
